
<script setup>
import {ref,computed} from 'vue'
    const props=defineProps({one:Number,two:Number})
   const result =ref();
   function compare(a,b){
    console.log((typeof one))
    if((typeof one) !="number"||(typeof two)!="number")
        return 'no'
    else if (a>b)
      return 'a>b'
    else if (a==b)
      return 'a=b'
    else if (a<b)
      return 'a<b'

     }
</script>

<template>
<button v-on:click="result=compare(one,two)">比较</button><br>
比较结果{{result}}
{{ typeof one=="string"}}
</template>

<style scoped>
</style>
